{% include 'base.html'%}
<div class = "page">
{% load url from future %}
<a href="{% url 'interview.views.index' %}"><div class="header"><h1>Registration</h1></div></a>
<div class="header1">
	<p>Group 1, <b><i>A.S.P.H.A.L.T,   </br>A Software Process Help And L.E.O.P.A.R.D. Tool,	 </br>Logically Evolving Operational Planning Around Resource Distribution.</i></b></p>

</div>
<div class="login">
	{% if user.is_authenticated %}	
		<h1> You are logged in as {{user}}</h1>
	<form method = post action="{% url 'interview.views.LogUserOut' %}">
	{% csrf_token %}
		<input name="userAction" type = "submit" value="Logout"/>

	</form>
	{% if user.is_staff %}
		<a href="{% url 'admin:index' %}"><h1>Change, Add, Delete: Facts, Rules, and Questions</h1></a>
	{% endif %}
	{% else %}
	<form method = post action="{% url 'interview.views.LogUserIn' %}">
	{% csrf_token %}
		<table>
		<tr>
			<td align="left">Username:</td><td align="right"><input type="text" name="username" /></td>
		</tr>
		<tr>
			<td align="left">Password:<td align="right"><input type="password" name= "password" /></td>
		</tr>
		<tr>
			<td align="right"><input name="userAction" type = "submit" value="Login"/></td>
			<td align="right"><a href="{% url 'interview.views.register' %}">Create a new Account</a></td>		
		</tr>
		
		</table>
	</form>

	{% endif %}
</div>

<!-- Register html -->

<div class = "register">
<H2>Register</H2>

{% load url from future %}

{% block content %}
{{ state }}
{% if form.errors %}
<p>Something went wrong. Please try again.</p>
{% endif %}

<form method="post" action="{% url 'interview.views.register' %}"">
{% csrf_token %}
<table>
<tr>
    <td><label for="id_username">Username</label></td>
    <td><input id="id_username" type="text" name="username" maxlength="30" /></td>
</tr>
<tr>
    <td><label for="id_password">Password</label></td>
    <td><input type="password" name="password" id="id_password" /></td>
</tr>
<tr>
	<td><label>Confirm Password</label></td>
	<td><input type="password" name="confirmPassword"/></td>
</tr>
</table>
<br/>
<input type="submit" value="create an account" />
</form>

{% endblock %}
</div>
</div>
</BODY>
</HTML>
